import UserLogin from '@/pages/UserLogin';
import UserRegister from '@/pages/UserRegister';
import Dashboard from '@/pages/Dashboard';

import Goods from '@/pages/Goods';

import NotFound from '@/pages/NotFound';
import Generate from '@/pages/Generate';

import UserLayout from '@/layouts/UserLayout';
import BasicLayout from '@/layouts/BasicLayout';

const routerConfig = [{
    path: '/user',
    component: UserLayout,
    children: [{
        path: '/login',
        component: UserLogin
      },
      {
        path: '/register',
        component: UserRegister
      },
    ],
  },
  {
    path: '/',
    component: BasicLayout,
    children: [{
        path: '/dashboard',
        component: Dashboard
      },
      {
        path: '/goods',
        component: Goods
      },
      {
        path: '/generate',
        component: Generate
      },
      {
        path: '/',
        redirect: '/dashboard'
      },
      {
        component: NotFound
      },
    ],
  },
];

export default routerConfig;
